home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / Professional Programmer XSL IDE / Xselerator25.msi / Data.Cab / F38418_testSqrt.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2002-01-20  |  2.5 KB  |  83 lines

  1. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  2. >
  3.   <xsl:import href="sqrt.xsl"/>
  4.   
  5.   <!-- To be applied on any source xml. 
  6.        This also tests the within() function 
  7.   -->
  8.   
  9.   <xsl:output indent="yes" omit-xml-declaration="yes"/>
  10.   
  11.   <xsl:template match="/">
  12.      sqrt(0.25): 
  13.      <xsl:call-template name="sqrt">
  14.         <xsl:with-param name="N" select="0.25"/>
  15.         <xsl:with-param name="Eps" select="0.00001"/>
  16.      </xsl:call-template>
  17.      
  18.      sqrt(1): 
  19.      <xsl:call-template name="sqrt">
  20.         <xsl:with-param name="N" select="1"/>
  21.         <xsl:with-param name="Eps" select="0.00001"/>
  22.      </xsl:call-template>
  23.      
  24.      sqrt(2): 
  25.      <xsl:call-template name="sqrt">
  26.         <xsl:with-param name="N" select="2"/>
  27.         <xsl:with-param name="Eps" select="0.00001"/>
  28.      </xsl:call-template>
  29.      
  30.      sqrt(9): 
  31.      <xsl:call-template name="sqrt">
  32.         <xsl:with-param name="N" select="9"/>
  33.         <xsl:with-param name="Eps" select="0.00001"/>
  34.      </xsl:call-template>
  35.      
  36.      sqrt(16): 
  37.      <xsl:call-template name="sqrt">
  38.         <xsl:with-param name="N" select="16"/>
  39.         <xsl:with-param name="Eps" select="0.00001"/>
  40.      </xsl:call-template>
  41.      sqrt(25): 
  42.      <xsl:call-template name="sqrt">
  43.         <xsl:with-param name="N" select="25"/>
  44.         <xsl:with-param name="Eps" select="0.00001"/>
  45.      </xsl:call-template>
  46.      sqrt(36): 
  47.      <xsl:call-template name="sqrt">
  48.         <xsl:with-param name="N" select="36"/>
  49.         <xsl:with-param name="Eps" select="0.00001"/>
  50.      </xsl:call-template>
  51.      
  52.      sqrt(49): 
  53.      <xsl:call-template name="sqrt">
  54.         <xsl:with-param name="N" select="49"/>
  55.         <xsl:with-param name="Eps" select="0.00001"/>
  56.      </xsl:call-template>
  57.      
  58.      sqrt(64): 
  59.      <xsl:call-template name="sqrt">
  60.         <xsl:with-param name="N" select="64"/>
  61.         <xsl:with-param name="Eps" select="0.00001"/>
  62.      </xsl:call-template>
  63.      
  64.      sqrt(81): 
  65.      <xsl:call-template name="sqrt">
  66.         <xsl:with-param name="N" select="81"/>
  67.         <xsl:with-param name="Eps" select="0.00001"/>
  68.      </xsl:call-template>
  69.      
  70.      sqrt(100): 
  71.      <xsl:call-template name="sqrt">
  72.         <xsl:with-param name="N" select="100"/>
  73.         <xsl:with-param name="Eps" select="0.00001"/>
  74.      </xsl:call-template>
  75.      
  76.      sqrt(121): 
  77.      <xsl:call-template name="sqrt">
  78.         <xsl:with-param name="N" select="121"/>
  79.         <xsl:with-param name="Eps" select="0.00001"/>
  80.      </xsl:call-template>
  81.   </xsl:template>
  82.  
  83. </xsl:stylesheet>